<div id="sidebar" class="collapse">
    <div class="logo">
        <a href="{{ URL::route('admin.index.index') }}"></a>
    </div>
    <ul id="sidebar_menu" class="navbar nav nav-list sidebar_box">
    @foreach($menus as $key => $menu)
        @if($menu['element'] == true)
        <li class="accordion-group @if($menu['title'] == $METHOD) active @endif">
            <a class="accordion-toggle widgets collapsed" data-toggle="collapse" data-parent="#sidebar_menu" href="#collapse{{ $key }}">
                <img src="{{ URL::asset('ad/img/menu_icons/'.$menu['title'].'.png') }}">
                {{ $menu['name'] }}
            </a>
            <ul id="collapse{{ $key }}" class="accordion-body collapse @if($menu['title'] == $METHOD) in @endif">
                @foreach($menu['info'] as $element)
                <li  @if($element['title'] == $ACTION && $menu['title'] == $METHOD) class="active" @endif>
                    <a href="{{ URL::route('admin.'.$menu['title'].'.'.$element['title']) }}"><i class="fa {{ $element['icon'] }}"></i> {{ $element['name'] }}</a>
                </li>
                @endforeach
            </ul>
        </li>
        @else
        <li @if($menu['title'] == $METHOD) class="active" @endif>
            <a class="dashboard"data-parent="#sidebar_menu" href="@if($menu['href']) {{ $menu['href'] }} @else {{ URL::route('admin.'.$menu['title'].'.index') }} @endif">
                <img src="{{ URL::asset('ad/img/menu_icons/'.$menu['title'].'.png') }}">
                {{ $menu['name'] }}
            </a>
        </li>
        @endif
    @endforeach
    </ul>
</div>